<{include file="public/header.html"}>


<p id="page-intro">Free Blog</p>
<!--如果想要这个右边头部导航菜单打开注释即可
<{include file="public/right_header_menu.html"}>
-->
<div class="clear"></div> <!-- End .clear -->

<div class="content-box"><!-- Start Content Box -->
    <div class="content-box-header">

        <h3>添加用户组</h3>

        <ul class="content-box-tabs">
            <li><a href="#tab1" class="default-tab">添加用户组</a></li>
            <!-- href must be unique and match the id of target div -->

        </ul>

        <div class="clear"></div>

    </div> <!-- End .content-box-header -->

    <div class="content-box-content">
        <div class="tab-content default-tab" id="tab1">
            <!-- This is the target div. id must match the href of this div's tab -->
            <div class="notification attention png_bg">
                <a href="#" class="close"><img src="<{$res}>/images/icons/cross_grey_small.png" title="关闭友情提醒"
                                               alt="关闭"/></a>
                <div>
                    友情提醒：带*号的都为必填项
                </div>
            </div>
            <form action="<{$url}>/insert" method="post" id="frm">
                <table>
                    <tbody>
                    <tr>
                        <td>&nbsp</td>
                        <td>&nbsp</td>
                        <td>&nbsp</td>
                        <td>&nbsp</td>
                        <td width="350">相册分类<font color="red">*</font></td>
                        <td><{$select}>
                            <div id="ck" style="display:none;width:150px"></div>
                        </td>
                        <td>&nbsp</td>
                    </tr>
                    <tr>
                        <td>&nbsp</td>
                        <td>&nbsp</td>
                        <td>&nbsp</td>
                        <td>&nbsp</td>
                        <td>相册名称<font color="red">*</font></td>
                        <td><input type="text" name="album_title" id="ck_name" onfocus="ck_ns()" onblur="ck_n()">
                            <div id="cname" style="display:none;width:150px"></div>
                        </td>
                        <td>&nbsp</td>
                    </tr>
                    <tr>
                        <td>&nbsp</td>
                        <td>&nbsp</td>
                        <td>&nbsp</td>
                        <td>&nbsp</td>
                        <td>相册描述<font color="red">*</font></td>
                        <td width="300"><textarea name="album_description" onfocus="ck_tt()" onblur="ck_t()"
                                                  id="tt"></textarea>
                            <div id="ctt" style="display:none;width:150px"></div>
                        </td>
                        <td width="400"></td>
                    </tr>

                    <tr>
                        <td>&nbsp</td>
                        <td>&nbsp</td>
                        <td>&nbsp</td>
                        <td>&nbsp</td>
                        <td>&nbsp</td>
                        <td>
                            <div class="bulk-actions align-left">
                                <button class="button" id="subs" onclick="actions()">确定</button>
                                &nbsp&nbsp&nbsp
                                <input class="button" type="reset" value="重置"/>
                            </div>
                            <div class="clear"></div>
                        </td>
                    </tr>
                    </tbody>

                </table>
            </form>
        </div> <!-- End #tab1 -->
        <script>
            var sel = document.getElementById('sel');
            var ck_sel = document.getElementById('ck');
            var frm = document.getElementById('frm');
            var subs = document.getElementById('subs');
            var ctt = document.getElementById('tt');
            var ct = document.getElementById('ctt');
            var ck_name = document.getElementById('ck_name');
            var cname = document.getElementById('cname');
            var tflag = false;
            var nflag = false;

            function ck_tt() {
                ct.style.display = "block";
                if (ctt.value.length < 1) {
                    ct.style.background = "#fffbcc";
                    ct.innerHTML = "描述不能为空";
                } else {
                    ct.style.background = "#fffbcc";
                    ct.innerHTML = "验证通过";
                    tflag = true;
                }
            }

            function ck_t() {
                if (ctt.value.length < 1) {
                    ct.style.background = "#fffbcc";
                    cname.innerHTML = "描述不能为空";
                } else {
                    ct.style.background = "#fffbcc";
                    ct.innerHTML = "验证通过";
                    tflag = true;
                }
            }

            function ck_ns() {
                cname.style.display = "block";
                if (ck_name.value.length < 1) {
                    cname.style.background = "#fffbcc";
                    cname.innerHTML = "用户名不能为空";
                } else {
                    cname.style.background = "#fffbcc";
                    cname.innerHTML = "验证通过";
                    nflag = true;
                }
            }

            function ck_n() {
                if (ck_name.value.length < 1) {
                    cname.style.background = "#fffbcc";
                    cname.innerHTML = "用户名不能为空";
                } else {
                    cname.style.background = "#fffbcc";
                    cname.innerHTML = "验证通过";
                    nflag = true;
                }
            }

            function actions() {
                if (nflag == true && tflag == true) {


                    frm.submit();

                } else {
                    if (sel.value == 0) {
                        ck_sel.style.display = "block";
                        ck_sel.style.background = "#fffbcc";
                        ck_sel.innerHTML = "请选择相册分类";
                    }
                    ck_tt();
                    ck_ns();
                }
            }
        </script>

    </div> <!-- End .content-box-content -->
</div> <!-- End .content-box -->


<!--
    <{include file="public/content_box.html"}>
-->

<div class="clear"></div>

<!-- 自定义消息提示框，需要就打开
<{include file="public/notic_box.html"}>
 -->

<!--页面底部-->
<{include file="public/foot.html"}>











